<?php ini_set("precision","2"); ?>
<?php $season = Doctrine::getTable('BbSeason')->findOneBySId($seasonId)?>
<?php $league = $season->getBbLeague()?>
		
		
<div class="column-left" id="searchresult">

  <?php include_partial('content/slider', array('leagueId'=>$season->getLId()));?>
  
   <?php include_partial('content/albumslider', array('seasonId'=>$seasonId));?>
  
  <div class="gn_box" style="width:49%; float:right;">
      <?php $newss = Doctrine::getTable('News')->fetchall(array('seasonId'=>$seasonId, 'limit'=>2))?>
      <div id="gn-widget-head-7" class="gn_box_head">
          <div class="gn_box_head_title">
              <a href="<?php echo url_for('content/index?league_id=2')?>"><?php echo $league.' :: Мэдээ'?></a>
          </div>
      </div>
      <div id="widget-cont-7" style="height:300px;overflow-y:auto;">
         <?php include_partial('content/newslist', array('newss'=>$newss));?>
      </div><!--widget-cont-7-->

      <div style="text-align:right;font-weight:bold;padding:5px 10px;border-top:1px solid #C2C2C2;">
        <?php echo link_to('Бусад мэдээ мэдээлэл', 'content/index?league_id=', array('style'=>'font-weight:bold;font-size:11px;color:#333;text-decoration:none;'))?> &raquo; 
     </div>
  </div><!--gn_box-->

  <br clear="all">
  <br clear="all">
  
 
  
  <?php include_partial('content/videoslider', array('seasonId'=>$seasonId));?>
  
   <?php if($seasonId==2) { ?> 
  <div class="gn_box" style="width:49%; float:right;">	
		<?php $even=1;?>
	    <div id="gn-widget-head-7" class="gn_box_head">
		          <div class="gn_box_head_title">
		              <a href="<?php echo url_for('content/index?league_id=2')?>"><?php echo $league.':: Хүснэгт'?></a>
		          </div>
	    </div>
   <div class="mod-container mod-table">
					<div class="mod-content">
						<table cellspacing="1" cellpadding="3" class="tablehead">
							<tbody>
							<tr align="center" class="colhead">
								  <td>Байр</td>
					              <td align="left">Баг</td>			            
					              <td>
						              <?php 
						              	echo 'Хожил'				               
						              ?>	
					              </td> 
					              <td>
						              <?php
						                echo 'Хожигдол'
						              ?>
					              </td>
					          </tr>
					<?php $a = Doctrine::getTable('BbSeason')->getStandings($seasonId, 'win', 'des');?>		
					<?php $i=1; ?><?php $odd=1;?>
		              <?php foreach ($a as $key=>$value): ?>
		              	<?php $team = Doctrine::getTable('BbTeams')->findOneById($value['teamId']); ?>
		               	<tr class="<?php if($odd==1) { echo 'odd'; $odd=0; } else { echo 'even'; $odd=1; }?>" align="center">
		              		<td><?php echo $i.'.' ?></td>	
		              		<td align="left"><a href="/teams/<?php echo $team->getTName()?>"><?php echo $team ?></a></td>
		              		<td><?php echo $value['win'] ?></td>
		              		<td><?php echo $value['lose'] ?></td>          		
		              	</tr>
		            	<?php $i++; endforeach;?>
		            </tbody></table>
		
				</div>
				<div class="foot-footer"></div>
		</div>
  </div><!--gn_box-->
  <?php } ?>
  
  <br clear="all">
  <br clear="all">

</div>

<script type="text/javascript">
$(document).ready( function(){
    $('#box1').tabs();
    $('#box2').tabs();
    $('#box3').tabs();
    $('#box4').tabs();
    $('#box5').tabs();
});
</script>


